﻿<%@ Page Title="" Language="C#" MasterPageFile="~/TeacherMaster.Master" AutoEventWireup="true"
    CodeBehind="Teacindex.aspx.cs" Inherits="LIMS.Web.Teacindex" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script src="jQuery/jquery-1.9.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#<%=btnSearch.ClientID %>").click(function () {
                var txtCaption = $.trim($("#<%=txtCaption.ClientID %>").text());
                if (txtCaption.length == 0) {
                    $("#EmptyMessage").text("标题不能为空!").show();
                    return false;
                }
                else {
                    $("#EmptyMessage").text("").hide();
                    return true;
                }
            });
        })
    </script>
    <table width="558" border="0" cellspacing="0" cellpadding="0">
        <tr>
            <td align="left">
                <img src="images/shiyan.jpg" height="35" alt="" />
            </td>
        </tr>
        <tr>
            <td>
                <table style="width: 100%;">
                    <tr>
                        <td>
                            <strong>
                                <%--老师查看实验室管理员发布的信息--%></strong>
                        </td>
                        <td style="text-align: center; font-size: 30px;">
                            <strong>信息查看</strong>
                        </td>
                    </tr>
                    <tr>
                        <td align="left">
                        </td>
                        <td style="height: 30px; width: 600px; font-size: 14px;">
                            <div style="margin-left: 20px; width: 210px; float: left;">
                                信息标题<asp:TextBox ID="txtCaption" runat="server" Columns="6" MaxLength="20" Width="150px"></asp:TextBox></div>
                            <div style="margin-left: 30px; width: 150px; float: left;">
                                所属类别
                                <asp:DropDownList ID="ddlInfo" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlInfo_SelectedIndexChanged">
                                    <asp:ListItem Text="所有类别" Value="-1"></asp:ListItem>
                                    <asp:ListItem Text="紧急通知" Value="1"></asp:ListItem>
                                    <asp:ListItem Text="普通通知" Value="0"></asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div style="margin-left: 20px; float: left;">
                                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="搜 索" />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <strong></strong>
                        </td>
                        <td style="width: 600px;">
                            <div id="EmptyMessage" style="margin-left: 80px; width: 200px; color: Red;">
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td height="30" colspan="2" align="left">
                            <asp:Repeater ID="rpNewsInfo" runat="server" OnItemDataBound="rpNewsInfo_OnItemDataBound">
                                <HeaderTemplate>
                                    <table border="1" width="100%">
                                        <thead align="center">
                                            <th>
                                                序号
                                            </th>
                                            <th>
                                                新闻标题
                                            </th>
                                            <th>
                                                新闻类别
                                            </th>
                                            <th>
                                                主要内容
                                            </th>
                                        </thead>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tbody>
                                        <tr align="center">
                                            <td>
                                                <%#Container.ItemIndex+1 %>
                                            </td>
                                            <td>
                                                <%#Eval("newsInfoTitle")%>
                                            </td>
                                            <td>
                                                <%# Eval("newsInfoType").ToString()=="True"?"紧急":"普通"%>
                                            </td>
                                            <td align="left">
                                                <%# SubString(Eval("newsInfoDetail").ToString(), 15)%>
                                            </td>
                                        </tr>
                                </ItemTemplate>
                                <FooterTemplate>
                                    </tbody></table>
                                </FooterTemplate>
                            </asp:Repeater>
                            <br />
                            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" CustomInfoHTML="总记录数:%RecordCount%, 总页数:%PageCount%, 当前为第 %CurrentPageIndex% 页"
                                FirstPageText="<<" LastPageText=">>" LayoutType="Div" NextPageText=">" NumericButtonCount="6"
                                PageIndexBoxType="DropDownList" PageSize="1" PrevPageText="<" ShowNavigationToolTip="true"
                                PagingButtonSpacing="6px" ShowCustomInfoSection="Right" OnPageChanged="AspNetPager1_PageChanged"
                                Font-Size="12px" HorizontalAlign="Center" Width="100%" AlwaysShow="true" CustomInfoSectionWidth="40%">
                            </webdiyer:AspNetPager>
                            <br />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
